package nimbus.events
{
	import flash.events.Event;
	
	import nimbus.commands.base.ICommand;

	public class ExecutionEvent extends Event
	{
		public static const EXECUTION_COMPLETE:String = 'executionComplete';
		
		public var command:ICommand;
		public var success:Boolean;
		public var isUndo:Boolean;
		public var isRedo:Boolean;
		
		public function ExecutionEvent(type:String, command:ICommand, success:Boolean=true,
				isUndo:Boolean=false, isRedo:Boolean=false)
		{
			super(type);
			this.success = success;
			this.command = command;
			this.isUndo = isUndo;
			this.isRedo = isRedo;
		}
		
		override public function clone():Event
		{
			return new ExecutionEvent(type, command, success, isUndo, isRedo);
		}
	}
}